import { createRouter, createWebHistory } from 'vue-router'
const routes = [
  { path: '/login', name: 'login', meta: { notoken: true }, component: () => import('@/views/login/login.vue') },
  {
    path: '/', name: '/yonghuguanli', component: () => import('@/components/navbar.vue'),
    children: [
      { path: '/yonghuliebiao', name: 'yonghuliebiao', component: () => import('@/views/yonghuguanli/yonghuliebiao.vue'), meta: { titL: ['用户列表'], tab: '/yonghuliebiao', back: false } },
      { path: '/qiuyuanliebiao', name: 'qiuyuanliebiao', component: () => import('@/views/yonghuguanli/qiuyuanliebiao.vue'), meta: { titL: ['球员列表'], tab: '/qiuyuanliebiao', back: false } },
      { path: '/jigouliebiao', name: 'jigouliebiao', component: () => import('@/views/yonghuguanli/jigouliebiao.vue'), meta: { titL: ['机构列表'], tab: '/jigouliebiao', back: false } },
      { path: '/xiehuiliebiao', name: 'xiehuiliebiao', component: () => import('@/views/yonghuguanli/xiehuiliebiao.vue'), meta: { titL: ['协会列表'], tab: '/xiehuiliebiao', back: false } },
      { path: '/qiuyuansheneh', name: 'qiuyuansheneh', component: () => import('@/views/yonghuguanli/qiuyuansheneh.vue'), meta: { titL: ['球员审核'], tab: '/qiuyuansheneh', back: false } },
      { path: '/qiuyuanxiangqing/:id', name: 'qiuyuanxiangqing', component: () => import('@/views/yonghuguanli/qiuyuanxiangqing.vue'), meta: { titL: ['球员详情'], tab: '/qiuyuanxiangqing', back: true } },
      { path: '/jigouxiangqing/:id', name: 'jigouxiangqing', component: () => import('@/views/yonghuguanli/jigouxiangqing.vue'), meta: { titL: ['详情'], tab: '/jigouxiangqing', back: true } },
      { path: '/userinfo/:id', name: 'userinfo', component: () => import('@/views/yonghuguanli/userinfo.vue'), meta: { titL: ['用户详情'], tab: '/userinfo', back: true } },
      { path: '/xiehuixiangqing/:id', name: 'xiehuixiangqing', component: () => import('@/views/yonghuguanli/xiehuixiangqing.vue'), meta: { titL: ['详情'], tab: '/xiehuixiangqing', back: true } },
    ],
  },
  {
    path: '/', name: '/saishiguanli', component: () => import('@/components/navbar.vue'),
    children: [
      { path: '/saishi', name: 'saishi', component: () => import('@/views/saishiguanli/saishi.vue'), meta: { titL: ['赛事列表'], tab: '/saishi', back: false } },
      { path: '/saishixiangqingnwe/:id', name: 'saishixiangqingnwe', component: () => import('@/views/saishiguanli/saishixiangqingnwe.vue'), meta: { titL: ['赛事详情'], tab: '/saishixiangqingnwe', back: true } },
    ],
  },
  {
    path: '/', name: '/dongtaiguanli', component: () => import('@/components/navbar.vue'),
    children: [
      { path: '/dongtailiebiao', name: 'dongtailiebiao', component: () => import('@/views/dongtaiguanli/dongtailiebiao.vue'), meta: { titL: ['动态列表'], tab: '/dongtailiebiao', back: false } },
      { path: '/dongtaixaingqing/:id', name: 'dongtaixaingqing', component: () => import('@/views/dongtaiguanli/dongtaixaingqing.vue'), meta: { titL: ['动态详情'], tab: '/dongtaixaingqing', back: true } },
    ],
  },
  {
    path: '/', name: '/qiuduiguanli', component: () => import('@/components/navbar.vue'),
    children: [
      { path: '/qiuduiliebiao', name: 'qiuduiliebiao', component: () => import('@/views/qiuduiguanli/qiuduiliebiao.vue'), meta: { titL: ['球队列表'], tab: '/qiuduiliebiao', back: false } },
      { path: '/qiuduixiangqing/:id', name: 'qiuduixiangqing', component: () => import('@/views/qiuduiguanli/qiuduixiangqing.vue'), meta: { titL: ['球队详情'], tab: '/qiuduixiangqing', back: true } },
    ],
  },
  {
    path: '/', name: '/wenzhangguanli', component: () => import('@/components/navbar.vue'),
    children: [
      { path: '/wenzhangliebiao', name: 'wenzhangliebiao', component: () => import('@/views/wenzhangguanli/wenzhangliebiao.vue'), meta: { titL: ['文章列表'], tab: '/wenzhangliebiao', back: false } },
      { path: '/tianjiawenzhang', name: 'tianjiawenzhang', component: () => import('@/views/wenzhangguanli/tianjiawenzhang.vue'), meta: { titL: ['添加文章'], tab: '/tianjiawenzhang', back: true } },
      { path: '/articleEdit/:id', name: 'articleEdit', component: () => import('@/views/set/articleEdit.vue'), meta: { titL: ['修改文章'], tab: '/articleEdit', back: false } },
      { path: '/gudingwenzhang', name: 'gudingwenzhang', component: () => import('@/views/wenzhangguanli/gudingwenzhang.vue'), meta: { titL: ['固定文章'], tab: '/gudingwenzhang', back: false } },
      { path: '/xiaoxiliebiao', name: 'xiaoxiliebiao', component: () => import('@/views/wenzhangguanli/xiaoxiliebiao.vue'), meta: { titL: ['消息'], tab: '/xiaoxiliebiao', back: false } },
      { path: '/dingxiangxiaoxi', name: 'dingxiangxiaoxi', component: () => import('@/views/wenzhangguanli/dingxiangxiaoxi.vue'), meta: { titL: ['发布定向消息'], tab: '/dingxiangxiaoxi', back: false } },
      { path: '/quanbuxiaoxi', name: 'quanbuxiaoxi', component: () => import('@/views/wenzhangguanli/quanbuxiaoxi.vue'), meta: { titL: ['发布全部消息'], tab: '/quanbuxiaoxi', back: true } },
      { path: '/shanchuwenzhang/:id', name: 'shanchuwenzhang', component: () => import('@/views/wenzhangguanli/shanchuwenzhang.vue'), meta: { titL: ['删除文章'], tab: '/shanchuwenzhang', back: false } },
      { path: '/xiugaigudingwenzhang/:id', name: 'xiugaigudingwenzhang', component: () => import('@/views/wenzhangguanli/xiugaigudingwenzhang.vue'), meta: { titL: ['修改固定文章'], tab: '/xiugaigudingwenzhang', back: true } },
      { path: '/shanchuxiaoxi', name: 'shanchuxiaoxi', component: () => import('@/views/wenzhangguanli/shanchuxiaoxi.vue'), meta: { titL: ['删除消息'], tab: '/shanchuxiaoxi', back: true } },
    ],
  },
  {
    path: '/', name: '/changguishezhi', component: () => import('@/components/navbar.vue'),
    children: [
      { path: '/advertisement', name: 'advertisement', component: () => import('@/views/changguishezhi/advertisement.vue'), meta: { titL: ['开机图管理'], tab: '/advertisement', back: false } },
      { path: '/cityPrice', name: 'cityPrice', component: () => import('@/views/cityPrice/index.vue'), meta: { titL: ['城市价格管理'], tab: '/cityPrice', back: false } },
      { path: '/bannerguanli', name: 'bannerguanli', component: () => import('@/views/changguishezhi/bannerguanli.vue'), meta: { titL: ['banner'], tab: '/bannerguanli', back: false } },
      { path: '/tianjiabanner', name: 'tianjiabanner', component: () => import('@/views/changguishezhi/tianjiabanner.vue'), meta: { titL: ['添加banner页'], tab: '/tianjiabanner', back: false } },
      { path: '/hezuohuoban', name: 'hezuohuoban', component: () => import('@/views/changguishezhi/hezuohuoban.vue'), meta: { titL: ['合作伙伴'], tab: '/hezuohuoban', back: false } },
      { path: '/addhezuohuoban', name: 'addhezuohuoban', component: () => import('@/views/changguishezhi/addhezuohuoban.vue'), meta: { titL: ['新增合作伙伴'], tab: '/addhezuohuoban', back: false } },
      { path: '/customerlist', name: 'customerlist', component: () => import('@/views/changguishezhi/customerlist.vue'), meta: { titL: ['客服管理'], tab: '/customerlist', back: false } },
      { path: '/addhezuohuoban', name: 'addhezuohuoban', component: () => import('@/views/changguishezhi/addhezuohuoban.vue'), meta: { titL: ['新增客户'], tab: '/addhezuohuoban', back: false } },
      { path: '/jiageshezhi', name: 'jiageshezhi', component: () => import('@/views/changguishezhi/jiageshezhi.vue'), meta: { titL: ['价格设置'], tab: '/jiageshezhi', back: false } },
      { path: '/xiugaihezuohuoban/:id', name: 'xiugaihezuohuoban', component: () => import('@/views/changguishezhi/xiugaihezuohuoban.vue'), meta: { titL: ['修改合作伙伴'], tab: '/xiugaihezuohuoban', back: false } },
    ],
  },
  {
    path: '/', name: '/caizhiguanli', component: () => import('@/components/navbar.vue'),
    children: [
      { path: '/caiwuliebiao', name: 'caiwuliebiao', component: () => import('@/views/caizhiguanli/caiwuliebiao.vue'), meta: { titL: ['财务列表'], tab: '/caiwuliebiao', back: false } },
    ],
  },
  {
    path: '/', name: '/set', component: () => import('@/components/navbar.vue'), children: [
      { path: '/identity', name: 'identity', component: () => import('@/views/set/identity.vue'), meta: { titL: ['身份管理'], tab: '/identity', back: false } },
      { path: '/appVersion', name: 'appVersion', component: () => import('@/views/set/appVersion.vue'), meta: { titL: ['版本管理'], tab: '/appVersion', back: false } },
      { path: '/yaoqingma', name: 'yaoqingma', component: () => import('@/views/set/yaoqingma.vue'), meta: { titL: ['邀请码列表'], tab: '/yaoqingma', back: false } },
      { path: '/manager', name: 'manager', component: () => import('@/views/set/manager.vue'), meta: { titL: ['管理员管理'], tab: '/manager', back: false } },],
  },

  {
    path: '/', name: '/guanfanggonggao', component: () => import('@/components/navbar.vue'),
    children: [
      { path: '/gonggaoliebiao', name: 'gonggaoliebiao', component: () => import('@/views/guanfanggonggao/gonggaoliebiao.vue'), meta: { titL: ['公告列表'], tab: '/gonggaoliebiao', back: false } },
      { path: '/gonggaofabu', name: 'gonggaofabu', component: () => import('@/views/guanfanggonggao/gonggaofabu.vue'), meta: { titL: ['公告列表', '发布公告'], tab: '/gonggaofabu', back: false } },
      { path: '/gonggaoxiangqing', name: 'gonggaoxiangqing', component: () => import('@/views/guanfanggonggao/gonggaoxiangqing.vue'), meta: { titL: ['公告详情'], tab: '/gonggaoxiangqing', back: true } },
      { path: '/gonggaoxiangqing/:id', name: 'gonggaoxiangqing', component: () => import('@/views/guanfanggonggao/gonggaoxiangqing.vue'), meta: { titL: ['公告详情弹窗'], tab: '/gonggaoxiangqing', back: false } },
      { path: '/xiugaigonggao/:id', name: 'xiugaigonggao', component: () => import('@/views/guanfanggonggao/xiugaigonggao.vue'), meta: { titL: ['修改公告'], tab: '/xiugaigonggao', back: false } },
    ],
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
